using System;
using System.Collections.Generic;
using System.Linq;
using System.Xml;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content.Pipeline;
using Microsoft.Xna.Framework.Content.Pipeline.Graphics;

using SobrietyEngine.Actor;

// TODO: replace this with the strType you want to import.
using TImport = System.String;//SobrietyEngine.UDMF.Map;
using TExport = System.String;

namespace XnaCP
{
    /// <summary>
    /// This class will be instantiated by the XNA Framework Content Pipeline
    /// to import a file from disk into the specified strType, TImport.
    /// 
    /// This should be part of a Content Pipeline Extension Library project.
    /// 
    /// TODO: change the ContentImporter attribute to specify the correct file
    /// extension, display name, and default processor for this importer.
    /// </summary>
    [ContentImporter(".wad", DisplayName = "UDMF Importer", DefaultProcessor = "ToString UDMF Processor")]
    public class UDMFImporter : ContentImporter<TImport>
    {
        public override TExport Import(string filename, ContentImporterContext context)
        {
            // TODO: read the specified file into an args of the imported strType.

            //System.Diagnostics.Debugger.Launch();
            //System.Diagnostics.Debugger.Break();

            string source = System.IO.File.ReadAllText(filename);

            return source;
        }
    }
}
